#include <iostream>
#include <math.h>
using namespace std;

int main()
{
	int i, n = 8, v[8] = {0, 0, 0, 0, 1, 1, 1, 0}, number = 0, p;
	int b = 2;
	p = n - 1;
	for (i = 0; i < n; ++i)
	{
		number += v[i] * pow(b, p);
		--p;
	}
	cout << number;
}